﻿using System;

namespace _021.子类的构造
{
	class DriverClass : BaseClass
	{
		public int attack;

		public DriverClass()
		{
			Console.WriteLine("子类的无参构造");
		}

		// 不指定 默认是调用的父类的无参构造器
		public DriverClass(int attack, int hp, int speed) : base(hp, speed)
		{
			this.attack = attack;
			this.hp = hp;
			this.speed = speed;
			Console.WriteLine("子类的有参构造");
		}
	}
}
